<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./newTemplate.xhtml">

            <ui:define name="top">
               
            </ui:define>

            <ui:define name="left">
                
            </ui:define>

            <ui:define name="right">
                
            </ui:define>

            <ui:define name="content">
                <f:view>
                    <h:form>
                        <h1><h:outputText value="Create/Edit"/></h1>
                        <p:panelGrid columns="2">
                           <p:outputLabel value="NameUser:" for="nameUser" />
                            <p:inputText id="nameUser" value="#{usuarioBean.user.nameUser}" title="NameUser"   required="true"  requiredMessage="The Nombre field is required." validatorMessage=" debe de iniciar conmayuscula">
                            <f:validateRegex pattern="[a-zA-Z]{1,20}"/> 
                            </p:inputText>
                            <p:outputLabel value="FirstName:" for="firstName" />
                            <p:inputText id="firstName" value="#{usuarioBean.user.firstName}" title="FirstName" required="true" requiredMessage="The ApellidoPaterno field is required." validatorMessage=" validacion para el apellido paterno tiene que tener un caracter en mayuscula">
                            <f:validateRegex pattern="[a-zA-Z]{1,20}"/>       
                             </p:inputText>
                            <p:outputLabel value="LastName:" for="lastName" />
                            <p:inputText id="lastName" value="#{usuarioBean.user.lastName}" title="LastName" required="true" requiredMessage="The ApellidoMaterno field is required." validatorMessage=" validacion para el apellido materno tiene que tener un caracter en mayuscula" >
                           <f:validateRegex pattern="[a-zA-Z]{1,20}"/>       
                             </p:inputText>
                            
                            <p:outputLabel value="Password:" for="password" />
                            <p:inputText id="password" value="#{usuarioBean.user.password}" title="Password"/>
                           
                            <p:outputLabel value="Email:" for="email" />
                            <p:inputText id="email" value="#{usuarioBean.user.email}" title="Email" />
                            <h:commandButton action="UsuarioConfirmar" value="aceptar"/>
                        </p:panelGrid>
                        <img src="resources/EEE.jpg" width="767" height="600" alt="es"/>
                    </h:form>
                </f:view>

            </ui:define>

          

        </ui:composition>

    </body>
</html>
